package com.sima.queues;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * Created by 锋情 on 2017-05-28.
 */
public class MyListener implements MessageListener {
    public void onMessage(Message message) {
        try {
            System.out.println("通过MyListener收到的消息："+((TextMessage)message).getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }

    }
}
